package com.zzedu.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.zzedu.domain.ZzStuNavicateLog;
import com.zzedu.dto.ZzStuNavicateLogDTO;
import com.zzedu.mapper.ZzStuNavicateLogMapper;
import com.zzedu.service.IZzStuNavicateLogService;
import org.springframework.stereotype.Service;
/**
 * (教育-校区)学生导航阅读记录Service业务层处理
 * 
 * @author Mr.Wang
 * @date 2025-07-24
 */
@Service
public class ZzStuNavicateLogServiceImpl extends ServiceImpl<ZzStuNavicateLogMapper,ZzStuNavicateLog> implements IZzStuNavicateLogService
{

    @Override
    public LambdaQueryWrapper<ZzStuNavicateLog> buildQuery(ZzStuNavicateLogDTO zzStuNavicateLog) {
        LambdaQueryWrapper<ZzStuNavicateLog> lambdaQueryWrapper = Wrappers.lambdaQuery();
        lambdaQueryWrapper.eq(null!=zzStuNavicateLog.getStuId(), ZzStuNavicateLog::getStuId, zzStuNavicateLog.getStuId());

        lambdaQueryWrapper.orderByDesc(ZzStuNavicateLog::getId);
        return lambdaQueryWrapper;
    }
}